
#pragma once

//#include "header.h"
#include "Obstacle.h"
#include "Action.h"
//#include "Controller.h"
//TODO a include b, b include a ??? why "class CController;" not #include "Controller.h"


using namespace cgMath;


namespace cgGame
{
	class CController;
	class CControllerHunter;
	class CControllerAnimal;
	//class CControllerFactory;

	class CCharacter : public CObstacle
	{
	public:
		//CCharacter();
		CCharacter(cgVector2D pos, unsigned int charID);
		//CCharacter(CHARACTER_TYPE charType = CHARACTER_TYPE_NULL);
		virtual ~CCharacter();


		//unsigned int	GetCharacterID();
		CAction&			GetCurrAction();
		
		void				SetCurrAction(CAction currAction);
		void				SetCurrDirection(cgVector2D newDir);
			
		float				GetRotationSpeed();
		void				SetRotationSpeed(float rotaSpeed);
		
		float				GetMoveSpeed();
		void				SetMoveSpeed(float moveSpeed);

		Character_Dir		GetDirection();
		void				SetDirection(Character_Dir dir);

		float				GetPerceiveRange();
		void				SetPerceiveRange(float perceiveRange);

		bool				GetIsAlive();
		//void				SetIsAlive(bool isAlive);

		void				SetLifeValue(int value);
		int					GetLifeValue();
		void				IncreLifeValue();
		void				ReduceLifeValue();

		bool				GetIsTurning();

		void				SetBulletType(Bullet_Type bulletType);
		Bullet_Type			GetBulletType();

		//virtual void SetTypeAndContr(CHARACTER_TYPE charType = CHARACTER_TYPE_NULL) = 0;
		void				SetTypeAndContr(Character_Type charType = Character_Type_Null);
		Character_Type		GetCharType();

		CController*		GetController();

	protected:
		//unsigned int		m_charID;
		Character_Type		m_charType;

		CAction				m_currAction;
		float				m_perceiveRange;

		float				m_rotationSpeed;
		float				m_moveSpeed;

		//TODO    controller??
		CController*		m_pController;

		Character_Dir		m_direction;
		bool				m_isTurnDir;

		//bool				m_isAlive;
		int					m_lifeValue;

		Bullet_Type			m_bulletType;
	};
}